import { BASEURL, fetch, post, patch, put, postConfig } from './http.js'

export const BASICURL = BASEURL;
// export const uploadPic = data => post('', data);
// export const getALL = () => post(地址);  post
// export const getALL = () => fetch(地址);  get

//POST "首页" => "上部面板"
export const dashBoardInfo = data => post('admin/system/statistics/dashboard', data);
//POST "首页" => "待处理事务（法币管理）"
export const queryOtc = data => post('admin/otc/order/page-query', data);
//POST "首页" => "待办事项" => "dashboard"
export const orderNum = () => post('admin/otc/order/get-order-num');
//POST "首页" => "获取验证码"
export const getLoginCode = data => post('admin/system/employee/check', data);
//POST "首页" => "获取验证码后登录"
export const signIn = data => post('admin/system/employee/sign/in', data);
//POST "首页" => "再次获取验证码后登录"
export const getCodeAgain = data => post('admin/code/sms-provider/login', data);
//POST "首页" => "统计" => "会员统计表"
export const memberBoard = data => post('admin/index/statistics/member-statistics-info', data);
//POST "首页" => "统计" => "会员统计图"
export const memberChart = data => post('admin/index/statistics/member-statistics-chart', data);
//POST "首页" => "统计" => "法币统计图"
export const otcChart = data => post('admin/index/statistics/otc-statistics-num-chart', data);
//POST "首页" => "统计" => "法币统计表"
export const otcBoard = data => post('admin/index/statistics/otc-statistics-turnover', data);
//POST "首页" => "统计" => "币币成交量/成交额 统计图"
export const coinChart = data => post('admin/index/statistics/exchange-statistics-turnover-chart', data);
//POST "首页" => "统计" => "币币成交量/成交额 统计表"
export const coinBoard = data => post('admin/index/statistics/exchange-statistics-turnover', data);
//POST "首页" => "统计图表" => "所有法币币种单位"
export const allOtcCoin = () => post('admin/otc/otc-coin/all-otc-coin-units');
//POST "首页" => "统计图表" => "所有币币交易区币种单位"
export const allBaseCoin = () => post('admin/exchange/exchange-coin/all-base-symbol-units');
//POST "首页" => "统计图表" => "所有币币交易币种"
export const allExchangeUnits = data => post('admin/exchange/exchange-coin/all-coin-symbol-units', data);

/******************** 会员管理 ********************/
//POST "会员管理" => "会员管理"
export const memberManage = data => post('admin/member/page-query', data);
//POST "会员管理" => "会员详情"
export const memberDetail = data => post('admin/member/detail', data);
//POST "会员实名审核"
export const MemberRealNameList = data => post('admin/member/member-application/page-query', data);
//POST "会员实名审核详情页"
export const MemberRealNameDetail = data => post('admin/member/member-application/detail', data);
//POST "会员实名审核通过"
export const memberCheckPass = data => patch(`admin/member/member-application/${data}/pass`);
//POST "会员实名审核不通过"
export const memberCheckNotPass = (url, data) => patch(`admin/member/member-application/${url}/no-pass`, data);
//POST "会员商家审核"
export const MemberBusinessList = data => post('admin/member/business-application/page-query', data);
//POST "会员管理" => "商家审核" => "申请资料信息"
export const businessDetail = (url, data) => fetch(`admin/member/business-application/${url}/business-auth-detail`, data);
//POST "会员管理" => "商家审核"
export const businessAudit = (parma, data) => patch(`admin/member/business-application/${parma}/audit-business`, data);
//POST "会员管理" => "商家取消认证"
export const businessCancel = (parma, data) => patch(`admin/member/business-application/${parma}/cancel-business`, data);
//POST "会员管理" => "会员详情" => "锁定钱包"
export const lockWallet = data => post('admin/member/coin-wallet/lock-wallet', data);
//POST "会员管理" => "会员详情" => "解锁钱包"
export const unlockWallet = data => post('admin/member/coin-wallet/unlock-wallet', data);
//POST "会员管理" => "会员资产"
export const memberAsset = data => post('admin/member/balance-wallet/balance', data);
//POST "会员管理" => "会员资产"
export const memberCoinAsset = data => post('admin/member/coin-wallet/balance', data);
//POST "会员管理" => "认证商家" => "禁用/解禁会员"
export const forbiddenMember = data => post('admin/member/alter-status', data);
//POST "会员管理" => "认证商家" => "禁用/解禁会员交易"
export const forbiddenMemberTrans = data => post('admin/member/alter-transaction-status', data);

/******************** 保留删除 ********************/
//GET "会员管理" => "保证金管理" => "分页查询"
export const queryBusinessAuth = data => fetch('admin/business-auth/page', data);
//POST "会员管理" => "保证金管理" => "创建保证金策略"
export const createBusinessAuth = data => post('admin/business-auth/create', data);
//GET "会员管理" => "保证金管理" => "更新保证金策略"
export const updateBusinessAuth = data => patch('admin/business-auth/update', data);
//POST "会员管理" => "会员详情" => "人工充币"
export const manualPay = data => post('admin/member/member-wallet/recharge', data);
//POST "会员管理" => "会员详情" => "重置地址"
export const resetMemberAddr = data => post('admin/member/member-wallet/reset-address', data);

/******************** 财务管理 ********************/
//POST "财务管理" => "充值管理(记录)"
export const depositManage = data => post('admin/finance/legal-balance-wallet/deposit/page-query', data);
//POST "财务管理" => "充值明细"
export const depositDetail = data => post('admin/finance/legal-balance-wallet/deposit/detail', data);
//Patch "财务管理" => "充值管理"   "审核通过"
export const depositAuditPass = (id, data) => patch(`admin/finance/legal-balance-wallet/deposit/${id}/pass`, data);
//Patch "财务管理" => "充值管理"   "审核不通过"
export const depositAuditNoPass = (id, data) => patch(`admin/finance/legal-balance-wallet/deposit/${id}/no-pass`, data);
//GET "财务管理" => "提现管理(记录)"
export const extractManage = data => post('admin/finance/legal-balance-wallet/extract/page-query', data);
//POST "财务管理" => "提现明细"
export const extractDetail = data => post('admin/finance/legal-balance-wallet/extract/detail', data);
//Patch "财务管理" => "提现管理"   "审核通过"
export const extractAuditPass = (id, data) => patch(`admin/finance/legal-balance-wallet/extract/${id}/pass`, data);
//Patch "财务管理" => "提现管理"   "审核不通过"
export const extractAuditNoPass = (id, data) => patch(`admin/finance/legal-balance-wallet/extract/${id}/no-pass`, data);
//POST "财务管理" => "充币申请"
export const recharge = data => fetch('admin/finance/member-coin-wallet/recharge/recharge', data);
//GET "财务管理" => "充币管理(记录)"
export const rechargeManage = data => post('admin/finance/member-coin-wallet/recharge/page-query', data);
//POST "财务管理" => "充值明细"
export const rechargeDetail = data => post('admin/finance/member-coin-wallet/recharge/detail', data);
//Patch "财务管理" => "充值管理"   "审核通过"
export const rechargeAuditPass = (id, data) => patch(`admin/finance/member-coin-wallet/recharge/${id}/pass`, data);
//Patch "财务管理" => "充值管理"   "审核不通过"
export const rechargeAuditNoPass = (id, data) => patch(`admin/finance/member-coin-wallet/recharge/${id}/no-pass`, data);
//GET "财务管理" => "提币管理(记录)"
export const withdrawManage = data => post('admin/finance/member-coin-wallet/withdraw/page-query', data);
//POST "财务管理" => "提值明细"
export const withdrawDetail = data => post('admin/finance/member-coin-wallet/withdraw/detail', data);
//Patch "财务管理" => "提值管理"   "审核通过"
export const withdrawAuditPass = (id, data) => patch(`admin/finance/member-coin-wallet/withdraw/${id}/pass`, data);
//Patch "财务管理" => "提值管理"   "审核不通过"
export const withdrawAuditNoPass = (id, data) => patch(`admin/finance/member-coin-wallet/withdraw/${id}/no-pass`, data);


//GET "财务管理" => "提币管理(记录)"
export const withdrawCoinManage = data => fetch('admin/finance/withdraw-record/page-query', data);
//Patch "财务管理" => "提币管理"   "一键通过"
export const auditPass = data => patch('admin/finance/withdraw-record/audit-pass', data);
//Patch "财务管理" => "提币管理"   "一键不通过"
export const auditNoPass = data => patch('admin/finance/withdraw-record/audit-no-pass', data);
//POST "财务管理" => "充币明细"
export const memberRecharge = data => post('admin/finance/member-coin-wallet/recharge', data);
//GET "财务管理" => "提币审核详情" => "个人交易详细信息"
export const personalTradeInfo = data => fetch(`admin/finance/withdraw-record/${data}`);
//GET "财务管理" => "提币审核详情" => "个人所有交易记录"
export const allTradeInfo = () => post('admin/finance/member-transaction/all');
//GET "财务管理" => "个人记录"
export const perTradeAll = data => post('admin/finance/member-transaction/page-query', data);
//patch "财务管理" => "放币"
export const passCoin = data => patch('admin/finance/withdraw-record/remittance', data);
//patch "财务管理" => "单个放币"
export const passCoinByOne = data => patch('admin/finance/withdraw-record/add-transaction-number', data);
//POST "财务管理" => "财务统计" => "总成交量"
export const financeTurnover = data => post('admin/finance/statistics/turnover-all', data);
//POST "财务管理" => "财务统计" => "手续费"
export const financeFee = data => post('admin/finance/statistics/fee', data);
//POST "财务管理" => "财务统计" => "总充币数"
export const financeRecharge = data => post('admin/finance/statistics/recharge-or-withdraw-amount', data);

/******************** 币种管理 ********************/
//POST "系统管理" => "查询币种"
export const querySysCoin = data => post('admin/system/coin/page-query', data);
//POST "系统管理" => "添加币种"
export const addSysCoin = data => post('admin/system/coin/create', data);
//POST "系统管理" => "更新币种"
export const updateSysCoin = data => post('admin/system/coin/update', data);
//POST "系统管理" => "删除币种"
export const delSysCoin = data => post('admin/system/coin/delete', data);
//POST "系统管理" => "币种详情"
export const sysCoinDetail = data => post('admin/system/coin/detail', data);
//POST "系统管理" => "币种管理" => "修改币种时发送验证码"
export const coinReviseSys = data => post('admin/code/sms-provider/system/coin-revise', data);
//POST "币币管理" => "转账地址所有币种"
export const getCoinName = () => post('admin/system/coin/all-name');

/******************** 法币管理 ********************/
//POST "法币管理" => "币种管理"->"删除"
export const delOtcCoin = data => post('admin/otc/otc-coin/deletes', data);
//POST "法币管理" => "币种管理"
export const queryOtcCoin = data => post('admin/otc/otc-coin/page-query', data);
//POST "法币管理" => "币种管理" => "添加币种"
export const addOtcCoin = data => post('admin/otc/otc-coin/create', data);
//POST "法币管理" => "币种管理" => "更新币种"
export const updateOtcCoin = data => post('admin/otc/otc-coin/update', data);
//GET "法币管理" => "充值管理"
export const rechargeOtcCoin = data => fetch('admin/legal-wallet-recharge/page', data);
//GET "法币管理" => "充值管理" => "详情"
export const otcCoinDetail = (url, data) => fetch(`admin/legal-wallet-recharge/${url}`, data);
//GET "法币管理" => "充值管理" => "通过"
export const rechargeOtcCoinPass = (url, data) => patch(`admin/legal-wallet-recharge/${url}/pass`, data);
//GET "法币管理" => "充值管理" => "不通过"
export const rechargeOtcCoinNoPass = (url, data) => patch(`admin/legal-wallet-recharge/${url}/no-pass`, data);
//POST "法币管理" => "充值管理" => "合法币种"
export const legalOtcCoin = () => post('admin/system/coin/all-name/legal');
//GET "法币管理" => "提现管理"
export const withdrawOtcCoin = data => fetch('admin/legal-wallet-withdraw/page', data);
//GET "法币管理" => "提现管理" => "详情"
export const withdrawOtcCoinDetail = (url, data) => fetch(`admin/legal-wallet-withdraw/${url}`, data);
//GET "法币管理" => "提现管理" => "通过"
export const withdrawOtcCoinPass = (url, data) => patch(`admin/legal-wallet-withdraw/${url}/pass`, data);
//GET "法币管理" => "提现管理" => "不通过"
export const withdrawOtcCoinNoPass = (url, data) => patch(`admin/legal-wallet-withdraw/${url}/no-pass`, data);
//GET "法币管理" => "提现管理" => "确认打款"
export const withdrawOtcCoinRemit = (url, data) => patch(`admin/legal-wallet-withdraw/${url}/remit`, data);
//GET "法币管理" => "退保管理" => "分页"
export const queryCancelApply = data => post('admin/business/cancel-apply/page-query', data);
//GET "法币管理" => "退保管理" => "详情"
export const cancelApplyDetail = data => post('admin/business/cancel-apply/detail', data);
//GET "法币管理" => "退保管理" => "审核通过/不通过"
export const checkApply = data => post('admin/business/cancel-apply/check', data);
//POST "法币管理" => "认证商家" => "分页查询"
export const queryBusiness = data => post('admin/business-auth/apply/page-query', data);
//POST "法币管理" => "认证商家" => "商家状态"
export const queryBusinessStatus = () => post('admin/business-auth/get-search-status');
//POST "法币管理" => "退保管理" => "状态"
export const cancelBusinessStatus = () => post('admin/business/cancel-apply/get-search-status');
//POST "法币管理" => "认证商家" => "详情"
export const authBusinessDetail = data => post('admin/business-auth/apply/detail', data);

/******************** 币币管理 ********************/
//POST "币币管理" => "币币管理"
export const queryExchangeCoin = data => post('admin/exchange/exchange-coin/page-query', data);
//POST "币币管理" => "币币设置"->"删除"
export const delExchangeCoin = data => post('admin/exchange/exchange-coin/deletes', data);
//POST "币币管理" => "币币设置" => "添加交易对"
export const addExchangeCoin = data => post('admin/exchange/exchange-coin/merge', data);
//POST "币币管理" => "币币设置" => "修改"
export const updateExchangeCoin = data => post('admin/exchange/exchange-coin/alter-rate', data);
//POST "币币管理" => "币币设置" => "查看撮合引擎概况"
export const overviewBB = data => post('admin/exchange/exchange-coin/exchange-overview', data);
//POST "币币管理" => "币币设置" => "启动交易引擎"
export const startBBTrader = data => post('admin/exchange/exchange-coin/start-trader', data);
//POST "币币管理" => "币币设置" => "停止交易引擎"
export const stopBBTrader = data => post('admin/exchange/exchange-coin/stop-trader', data);
//POST "币币管理" => "币币订单"
export const queryBBOrder = data => post('admin/exchange/exchange-order/page-query', data);
//POST "币币管理" => "币币订单"->"详情"
export const exgOrderDetail = data => post('admin/exchange/exchange-order/detail', data);
//POST "币币管理" => "币币设置" => "撤销所有委托单"
export const cancelBBAllOrders = data => post('admin/exchange/exchange-coin/cancel-all-order', data);
//POST "币币管理" => "委托管理" => "撤销"
export const cancelOrder = data => post('admin/exchange/exchange-order/cancel', data);

/******************** 帮助管理 ********************/
//POST 帮助管理
export const helpDown = data => post('admin/cms/system-help/down', data);
//POST "系统管理" => "内容管理" => "帮助管理"
export const helpManage = data => post('admin/cms/system-help/page-query', data);
//POST "系统管理" => "内容管理" => "帮助置顶"
export const stickTopHelp = data => post('admin/cms/system-help/top', data);
//POST "系统管理" => "内容管理" => "添加帮助"
export const addHelpManage = data => post('admin/cms/system-help/create', data);
//POST "系统管理" => "内容管理" => "删除帮助"
export const delHelpManage = data => post('admin/cms/system-help/deletes', data);
//POST "系统管理" => "内容管理" => "查看帮助"
export const helpManageDetail = data => post('admin/cms/system-help/detail', data);
//POST "系统管理" => "内容管理" => "更新帮助"
export const updateHelpManage = data => post('admin/cms/system-help/update', data);

/******************** 公告管理 ********************/
//POST 公告管理
export const manageDown = data => post('admin/system/announcement/down', data);
//POST "系统管理" => "内容管理" => "公告置顶"
export const stickTopAnnounce = data => post('admin/system/announcement/top', data);
//GET "系统管理" => "内容管理" => "公告管理"
export const announceManage = data => fetch('admin/system/announcement/page-query', data);
//POST "系统管理" => "内容管理" => "添加公告"
export const addAnnounce = data => post('admin/system/announcement/create', data);
//POST "系统管理" => "内容管理" => "删除公告"
export const delAnnounce = data => patch('admin/system/announcement/deletes', data);
//GET "系统管理" => "内容管理" => "公告详情"
export const announceDetail = parma => fetch(`admin/system/announcement/${parma}/detail`);
//PUT "系统管理" => "内容管理" => "修改公告"
export const updateAnnounce = (urlID, data) => put(`admin/system/announcement/${urlID}/update`, data);

/******************** 角色管理 ********************/
//POST "系统管理" => "所有角色"
export const roleManage = () => post('admin/system/role/all');
//POST "系统管理" => "角色管理" => "查询角色权限"
export const queryRolePermission = data => post('admin/system/role/permission', data);
//POST "系统管理" => "角色管理" => "添加或修改角色信息"
export const addAuditRole = data => post('admin/system/role/merge', data);
//POST "系统管理" => "角色管理" => "删除角色"
export const deleteRole = data => post('admin/system/role/deletes', data);

/******************** 部门管理 ********************/
//POST "系统管理" => "部门管理" => "所有部门"
export const departmentManage = () => post('admin/system/department/all');
//POST "系统管理" => "部门管理" => "添加或修改部门信息"
export const addAuditDepart = data => post('admin/system/department/merge', data);
//POST "系统管理" => "部门管理" => "查看部门详细信息"
export const departDetail = data => post('admin/system/department/detail', data);
//POST "系统管理" => "部门管理" => "删除部门"
export const delDepart = data => post('admin/system/department/deletes', data);

/******************** 权限管理 ********************/
//POST "系统管理" => "权限管理"
export const permissionManage = data => post('admin/system/permission/page-query', data);
//POST "系统管理" => "权限管理" => "获取全部权限"
export const getAllPermission = () => post('admin/system/role/permission/all');
//POST "系统管理" => "权限管理" => "添加编辑权限"
export const addAuditPermission = data => post('admin/system/permission/merge', data);
//POST "系统管理" => "权限管理" => "删除权限"
export const delPermission = data => post('admin/system/permission/deletes', data);

/******************** 用户管理 ********************/
//POST "系统管理" => "用户管理" => "所有用户"
export const queryEmployee = data => post('admin/system/employee/page-query', data);
//POST "系统管理" => "用户管理" => "新增或者修改用户"
export const addAuditEmployee = data => post('admin/system/employee/merge', data);
//POST "系统管理" => "用户管理" => "用户详情"
export const employeeDetail = data => post('admin/system/employee/detail', data);
//POST "系统管理" => "用户管理" => "删除用户"
export const delEmployee = data => post('admin/system/employee/deletes', data);
//POST "系统管理" => "用户管理" => "修改密码"
export const fixPersonalPW = data => post('admin/system/employee/update-password', data);

/******************** 系统管理 ********************/
//POST "系统管理" => "系统日志"
export const accessLog = (url, data) => fetch(`admin/system/access-log/page-query/${url}`, data);
//POST "系统管理" => "新增实名认证"
export const addAuthenticationSys = data => post('admin/system/member-application-config/merge', data);
//POST "系统管理" => "查询实名认证"
export const queryAuthenticationSys = data => post('admin/system/member-application-config/detail', data);
//POST "系统管理" => "字典查询" => "查询分页GET"
export const dictionaryQuery = data => fetch('admin/system/data-dictionary', data);
//POST "系统管理" => "字典查询" => "创建POST"
export const createDictionary = data => post('admin/system/data-dictionary', data);
//POST "系统管理" => "字典查询" => "更新数据"
export const updateDictionary = (url, data) => put(`admin/system/data-dictionary/${url}`, data);
//POST "系统管理" => "APP版本" => "列表"
export const sysAppRevision = data => fetch('admin/system/app-revision/page-query', data);
